package main

import (
  "net/http"
  "runtime"
  "go-scripts/common"
  "go-scripts/routes"
  "go-scripts/handler"
)

var logger *common.Log = common.GetLogger()


func main() {
  //按照cpu内核数开启线程
  runtime.GOMAXPROCS(runtime.NumCPU())
  //监听10000端口号
  err := http.ListenAndServe(":9999", handler.NewApp(new(routes.AppRoute)))
  if err != nil {
    logger.Fatal("ListenAndServe", err)
  }
}